﻿@{
    ViewBag.ParentUrl = "/Setting/Index";
    ViewBag.Title = "基础设置";
}
@section breadcrumb
{
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-home home-icon"></i>
            <a href="/">控制台</a>
        </li>
        <li class="active">@ViewBag.Title</li>
    </ul><!-- .breadcrumb -->
}
<div class="alert alert-block alert-success">
    <button type="button" class="close" data-dismiss="alert">
        <i class="ace-icon fa fa-times"></i>
    </button>
    <i class="ace-icon fa fa-check green"></i>
    每次变更了基础数据，最好更新一下系统缓存，相关设置才能立即生效！
</div>
<div class="row">
    <div class="col-xs-12">
        <h3 class="header smaller lighter green">更新缓存</h3>
        <p>
            <button class="btn btn-info" id="btnCleanCache">
                清除系统缓存
                <i class="ace-icon fa fa-refresh  align-top bigger-125 icon-on-right"></i>
            </button>
        </p>
    </div>
</div>
@section footer{
<script src="/assets/js/bootbox.min.js"></script>
    <script>
        $(function() {
            $('#btnCleanCache').on('click',function() {
                $.post('/Setting/CleanCache', null, function (o) {
                    //alert(o.Msg);
                    if (o.State == 0) {
                        bootbox.alert("系统缓存已清除！");
                    } else {
                        bootbox.alert("操作有误！");
                    }
                });
            });
        });
    </script>
}